package thread;

public class Demo102_Runnable {
    public static void main(String[] args) {
        myRunnable01 myRunnable01 = new myRunnable01();
        myRunnable02 myRunnable02 = new myRunnable02();
        Thread thread01 = new Thread(myRunnable01);
        Thread thread02 = new Thread(myRunnable02);
        thread01.start();
        thread02.start();
    }
}
class myRunnable01 implements Runnable {
    @Override
    public void run() {
        while(true) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println("生产皮鞋，金币+2::::");
        }

    }
}
class myRunnable02 implements Runnable {
    @Override
    public void run() {
        while(true) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println("生产运动鞋，金币+1::::");
        }
    }
}